package the.broccoli.weixin.service.dto;

import com.alibaba.fastjson.JSON;
import lombok.Data;

import java.io.Serializable;

@Data
public class WXCode2SessionResultDTO implements Serializable {
    private static final long serialVersionUID = 6572842886380537961L;

    private String session_key;
    private String unionid;
    private String errmsg;
    private String openid;
    private Integer errcode;

    public static WXCode2SessionResultDTO formJson(String json) {
        return JSON.parseObject(json, WXCode2SessionResultDTO.class);
    }

}
